The VBA LCASE Function converts a character string to lowercase.
LCase(text)
Using the LCase Function to convert a string to lowercase:
Sub LCaseExample1()
text = "Example@MOONEXCEL.com.ua"
text = LCase(text)
MsgBox text 'Returns: example@moonexcel.com.ua
End Sub
Using the LCase function to check if a string is lowercase:
Sub LCaseExample2()
nickname = "Treecher_21"
'Test if the nickname is equal to its value converted to lowercase
If nickname = LCase(nickname) Then
MsgBox "Yes, the nickname is lowercase."
Else
MsgBox "No, the nickname contains capital letters." 'Display this result
End If
End Sub